package com.egg.mall.entity.spu;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.egg.common.core.model.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;


/**
 * <p>
 * 商品SPU表
 * </p>
 *
 * @author east
 * @since 2022-08-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "mall_spu")
@ApiModel(value = "Spu对象", description = "商品SPU表")
public class Spu extends BaseEntity {


    @ApiModelProperty(value = "分类ID")
    @TableField(value = "category_id")
    private Long categoryId;

    @ApiModelProperty(value = "品牌ID")
    @TableField(value = "brand_id")
    private Long brandId;

    @ApiModelProperty(value = "名称")
    @TableField(value = "name")
    private String name;

    @ApiModelProperty(value = "原价格(单位:分)")
    @TableField(value = "origin_price")
    private Long originPrice;

    @ApiModelProperty(value = "现价格(单位:分)")
    @TableField(value = "price")
    private Long price;

    @ApiModelProperty(value = "销售量")
    @TableField(value = "sales")
    private Integer sales;

    @ApiModelProperty(value = "图片地址")
    @TableField(value = "pic_url")
    private String picUrl;

    @ApiModelProperty(value = "图册")
    @TableField(value = "album")
    private String album;

    @ApiModelProperty(value = "单位")
    @TableField(value = "unit")
    private String unit;

    @ApiModelProperty(value = "简介")
    @TableField(value = "description")
    private String description;

    @ApiModelProperty(value = "详情")
    @TableField(value = "detail")
    private String detail;

    @ApiModelProperty(value = "状态")
    @TableField(value = "state")
    private Boolean state;


}
